﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DAL;

namespace BUS
{
    public class NhaCungCap_BUS
    {
        NhaCungCap_DAO ws;
        public NhaCungCap_DTO[] LayDanhSachNCC()
        {
            ws = new NhaCungCap_DAO();
            NhaCungCap_DTO[] ncc = ws.DanhSachNCC();
            return ncc;
        }

        public NhaCungCap_DTO DanhSachNCC_TheoMaNCC(String str_Ma)
        {
            ws = new NhaCungCap_DAO();
            NhaCungCap_DTO NCC = ws.DanhSachNCC_TheoMaNCC(str_Ma);
            return NCC;
        }

        public string MaNCCTang()
        {
            ws = new NhaCungCap_DAO();
            return ws.MaNCCTang();
        }

        public int ThemNCC(NhaCungCap_DTO dto)
        {
            ws = new NhaCungCap_DAO();
            return ws.ThemNCC(dto);
        }

        public int XoaNCC(NhaCungCap_DTO dto)
        {
            ws = new NhaCungCap_DAO();
            return ws.XoaNCC(dto);
        }

        public int CapNhatNCC(NhaCungCap_DTO dto)
        {
            ws = new NhaCungCap_DAO();
            return ws.CapNhatNCC(dto);
        }
    }
}